package com.cyx.exam.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author cyx
 * @since 2021-03-09
 */
@Data
  @EqualsAndHashCode(callSuper = false)
    public class User implements Serializable {

    private static final long serialVersionUID = 1L;

      /**
     * 用户id
     */
        @TableId(value = "id", type = IdType.AUTO)
      private Integer id;

      /**
     * 用户名
     */
      private String name;

      /**
     * 密码
     */
      private String password;

      /**
       * 班级名称
       */
      private String className;

      /**
     * 1-管理员，2-普通用户
     */
      private Integer role;

      /**
       * 创建时间
       */
      @TableField(fill = FieldFill.INSERT)
      private LocalDateTime createTime;

      /**
       * 更新时间
       */
      @TableField(fill = FieldFill.INSERT_UPDATE)
      private LocalDateTime updateTime;
}
